package com.zyh.service.impl;

import com.zyh.entity.Order;
import com.zyh.mapper.OrderMapper;
import com.zyh.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public void insertOrder(Order order) {
        orderMapper.insertOrder(order);
    }

    @Override
    public List<Order> selectByUserId(Integer userId) {
        return orderMapper.selectByUserId(userId);
    }

    @Override
    public void orderPayed(Integer orderId) {
        orderMapper.orderPayed(orderId);
    }
}
